package myMapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import myClass.user;

public interface userMapper {
	
//	查找所有用户
	@Select("SELECT * FROM tb_user")
	public List<user> selectAllUsers();
	
//	根据用户名、密码查找指定账户
	@Select("SELECT password FROM tb_user WHERE username=#{username} AND password=#{password}")
	public List<user> checkUserAccount(@Param("username") String username,@Param("password")String password);
	
//	用户注册
	@Insert("INSERT INTO tb_user VALUES(#{username},#{password},#{tel},#{accountIdentity}) ")
	public void insertAccount(@Param("username") String username,@Param("password") String password,@Param("tel") String tel,@Param("accountIdentity") String accountIdentity);
	
}
